/*
 * @Author: DUST
 * @Date: 2023-06-20 09:29:23
 * @LastEditors: DUST
 * @LastEditTime: 2023-06-20 09:29:27
 * @FilePath: \national-standard-platform-alarm-screen\src\utils\ckThree\ckThree.js
 * @Description: 
 * undefined
 */
import { PerspectiveCamera } from "three";
/**
 * @description: 初始化相机
 * @param {*} scene：场景对象
 * @param {*} width：场景宽度
 * @param {*} height：场景高度
 * @param {*} cameraOptions：场景配置项
 */
const initCamera = (scene, width, height, cameraOptions) => {
  const camera = new PerspectiveCamera(
    cameraOptions.raduis,
    width / height,
    1,
    20000
  );
  camera.position.set(
    cameraOptions.x,
    cameraOptions.y,
    cameraOptions.z
  );
  scene.add(camera);

  return camera;
}

export default initCamera;